﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace WGM_Client_Net35
{
    /// <summary>
    /// Interaction logic for LocalOptionsWindow.xaml
    /// </summary>
    public partial class LocalOptionsWindow : Window
    {
        public LocalOptionsWindow()
        {
            InitializeComponent();
            if (!Properties.Settings.Default.IsFancyEffectsEnabled)
            {

            }
        }

        private void _doneBtn_MouseDown(object sender, MouseButtonEventArgs e)
        {
            Properties.Settings.Default.Save();
            this.Close();
        }

        private void _resetBtn_MouseDown(object sender, MouseButtonEventArgs e)
        {
            
            Properties.Settings.Default.Reset();
        }

        private void sysColChooser_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
        {
            _sFontChooser.Foreground = new SolidColorBrush(Color.FromRgb((byte)Properties.Settings.Default.SystemFontColorR,
                                                                         (byte)Properties.Settings.Default.SystemFontColorG,
                                                                         (byte)Properties.Settings.Default.SystemFontColorB));
        }

        private void overColChooser_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
        {
            _oFontChooser.Foreground = new SolidColorBrush(Color.FromRgb((byte)Properties.Settings.Default.OverrideIncomingFontColourR,
                                                             (byte)Properties.Settings.Default.OverrideIncomingFontColourG,
                                                             (byte)Properties.Settings.Default.OverrideIncomingFontColourB));

        }
        private void winColChooser_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
        {
            Properties.Settings.Default.WindowColorScheme = Color.FromRgb((byte)Properties.Settings.Default.WindowColorR,
                                                             (byte)Properties.Settings.Default.WindowColorG,
                                                             (byte)Properties.Settings.Default.WindowColorB);

        }


    }
}
